<template>
  <a-card :bordered="false" class="card-area">

    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :scroll='{ x: 1300 }'
        :loading="loading"
        @change="handleTableChange">
      </a-table>
    </div>

  </a-card>
</template>

<script>
import { httpAction, putAction, getAction, postAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'

export default {
  name: 'FamilyInfoForm',
  mixins: [JeecgListMixin],
  components: {},
  props: {
     patientId: Number,
  },
  watch: {
    patientId(newValue) {
      this.getPatient(newValue);
    }
  },
  data() {
    return {
      queryParam: {
        inhospitalId: 0
      },
      confirmLoading: false,
      disableMixinCreated: true,
      validatorRules: {},
      // 表头
      columns: [
        {
          title: '随访编号',
          align: 'center',
          dataIndex: 'planCode',
          width: 160
        },
        {
          title: '随访时间',
          align: 'center',
          dataIndex: 'createTime',
          width: 160
        },
        {
          title: '随访人员',
          align: 'center',
          dataIndex: 'eyName',
          width: 130
        },
        {
          title: '随访内容',
          align: 'center',
          dataIndex: 'recordContent',
          width: 120
        },
        {
          title: '精神状态',
          align: 'center',
          dataIndex: 'mentality',
          width: 120
        },
        {
          title: '运动情况(分钟/次)',
          align: 'center',
          dataIndex: 'sportsSituation',
          width: 140
        },
        {
          title: '每周运动情况(次/周)',
          align: 'center',
          dataIndex: 'weekSportsSituation',
          width: 150
        },
        {
          title: '摄盐情况',
          align: 'center',
          dataIndex: 'saltSituation',
          width: 100,
        },
        {
          title: '心理调整',
          align: 'center',
          dataIndex: 'psychologicalAdjust',
          width: 100,
        },
        {
          title: '遵医行为',
          align: 'center',
          dataIndex: 'complianceBehavior',
          width: 100
        },
        {
          title: '服药依从性',
          align: 'center',
          dataIndex: 'medicationCompliance',
          width: 120
        },
        {
          title: '用药情况',
          align: 'center',
          dataIndex: 'medicationSituation',
          width: 100
        }, {
          title: '指导意见',
          align: 'center',
          dataIndex: 'doctorGuidance',
          width: 120
        }
      ],
      url: {
        list: '/ch/interview/log/list'
      }
    }
  },
  created() {
  },
  methods: {
    getPatient(patientId){
      this.queryParam.patientId = patientId
      this.loadData()
    },
  }
}
</script>

<style scoped>

</style>